package com.broada.apm.indicator.api;

import java.util.List;

import com.broada.apm.indicator.api.common.ApmDataIndicatorException;
import com.broada.apm.model.performance.BasePerformance;

public interface PerformancePersistanceService {
	
	/**
	 * 保存性能数据
	 * @param perfs
	 */
	public void savePerfs(List<? extends BasePerformance> perfs);

	/**
	 * 清除性能数据
	 * @param index
	 * @param type
	 * @param timeInMs
	 * @param appIds
	 * @return
	 * @throws ApmDataIndicatorException
	 */
    public boolean clearPerf(String[] index, String type, long timeInMs, String appIds) throws ApmDataIndicatorException;
    
    /**
	 * 清除非关注服务节点性能数据
	 * @param index
	 * @param type
	 * @param timeInMs
	 * @param serviceIds
	 * @return
	 * @throws ApmDataIndicatorException
	 */
    public boolean clearDisServicePerf(String[] index, String type, long timeInMs, String[] serviceIds) throws ApmDataIndicatorException;
}
